<script language="Javascript">
function submitForm() {
tinyMCE.triggerSave();
document.forms[0].submit();
}
</script>

<p><?php if ($action == "add") echo "Add"; else echo "Edit"; ?> a reading assignment &mdash; Module <?php echo $mid; ?> of <?php echo $row_courses['jiu_course_id'].": ".$row_courses['name']; ?>.</p>

<table class="dataTable">
<tr style="background-color: <?php echo $color1; ?>">
	<td class="dataLabel" width="1%">Reading Material:</td>
    <td class="data" width="10%">
    <select name="reading_material">
    <?php do { ?>
    	<option value="<?php echo $row_materials['id']; ?>" <?php if (($action == "edit") && ($row_readings['reading_material'] == $row_materials['id'])) echo "SELECTED"; ?>><?php echo $row_materials['matAuthor']." - ".$row_materials['matTitle']; ?></option>
    <?php } while ($row_materials = mysql_fetch_assoc($materials)); ?>
    </select>
    </td>
    <td class="data help_text">Choose</td>
</tr>
<tr style="background-color: <?php echo $color2; ?>">
	<td class="dataLabel">Assignment:</td>
    <td class="data"><input name="reading_assignment" type="text" size="30" value="<?php if ($action == "edit") echo $row_readings['reading_assignment']; ?>"></td>
    <td class="data help_text">Chapter, pages, etc.</td>
</tr>
<tr style="background-color: <?php echo $color1; ?>">
	<td class="dataLabel">Notes:</td>
    <td class="data"><input name="reading_notes" type="text" size="50" value="<?php if ($action == "edit") echo $row_readings['reading_notes']; ?>"></td>
    <td class="data help_text">Provide any additional information about this reading assignment.</td>
</tr>
</table>
<p style="margin-top: 1.25em;"><input id="Submit" name="Submit" type="submit" class="button" value="<?php if (($action == "edit") || ($go == "missing")) echo "Update"; else echo "Submit"; ?>"></p>
<input name="vid" type="hidden" value="<?php if ($action == "add") echo "1"; elseif ((($action == "edit") || ($go == "missing"))  && ($vid != "default")) echo ($row_edit['vid']); else echo ($row_edit['vid'] + 1); ?>" />
